package com.xbongbong.paas.pojo;

import com.xbongbong.paas.field.FieldAttrEntity;
import com.xbongbong.pro.custombutton.pojo.CustomButtonActionPojo;
import com.xbongbong.paas.field.LinkListPojo;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * @author haibin.zhang
 * @version v1.0
 * @date 2019/1/24 15:45
 * @since v1.0
 */
@Getter
@Setter
public class DetailTabPojo implements Comparable<DetailTabPojo> {

    /**
     * 字段标识
     */
    private String attr;

    /**
     * 名称
     */
    private String name;

    /**
     * 对应的key
     */
    private String key;

    /**
     * 子表单的相关属性
     */
    private FieldAttrEntity fieldAttrEntity;

    private Integer sort;

    private Integer enable;

    private LinkListPojo linkList;
    /**
     * 是否有回款单权限
     */
    private Boolean isHasPaymentSheet;
    /**
     * 是否有应收款权限
     * @version2 2020/09/2是应收款
     */
    private Boolean isHasPayment;

    /**
     * 是否有付款单权限
     */
    private Boolean isHasPaySheet;
    /**
     * 是否有付款计划权限
     */
    private Boolean isHasPayPlan;

    /**
     * 回款计划
     */
    private Boolean isHasPaymentTask;
    /**
     *　是否有联系人组织树权限
     */
    private Boolean isHasContactTree;
    /**
     * 评论数
     */
    private Integer commentCount;
    /**
     * 点赞数
     */
    private Integer likeCount;

    /**
     * 云叩actions
     */
    private String actions;

    /**
     * 低代码，按钮动作
     */
    private List<CustomButtonActionPojo> actionList;


    private Long formId;

    /**
     * 经销商标识mark
     */
    private Integer distributorMark;

    @Override
    public int compareTo(DetailTabPojo o) {
        return this.sort - o.getSort();
    }

    public DetailTabPojo() {
    }

    public DetailTabPojo(String attr, String name, String key) {
        this.attr = attr;
        this.name = name;
        this.key = key;
    }
}
